package annotation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CarMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("annotation/CarBeans.xml");
        CarFactory factory = (CarFactory) context.getBean("carFactory");
        System.out.println(factory.getCarName());
    }
}
